//
//  HistorySettCell.m
//  ScalperMerchant
//
//  Created by 王云 on 2017/12/4.
//  Copyright © 2017年 WY. All rights reserved.
//

#import "HistorySettCell.h"

@implementation HistorySettCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
}
- (void)setItem:(NSDictionary *)item{
    _item = item;
    
    [_SettNumberL hw_setAttributedText:[NSString stringWithFormat:@"结算单：<style font=14 color=#686868>%@</style>",_item[@"bill_sn"]]];
    
    [_timeL hw_setAttributedText:[NSString stringWithFormat:@"申请时间：<style font=14 color=#686868>%@</style>",[HWCommon getTimeStr:[_item hw_safeObjectForKey:@"bill_create_time"] format:@"yyyy-MM-dd HH:mm:ss"]]];
    
    _settPrice.text = [NSString stringWithFormat:@"结算额：%@",_item[@"bill_result_total"]];
    
    if ([_item[@"bill_state"] integerValue] == 1) {
        _SettTypeL.text = @"申请中";
        _SettTypeL.textColor = WYColor(84, 156, 44);
        _imgV.image = [UIImage imageNamed:@"account_apply"];
        
    }else if ([_item[@"bill_state"] integerValue] == 2){
        _SettTypeL.text = @"结算中";
        _SettTypeL.textColor = KOrange;
        _imgV.image = [UIImage imageNamed:@"account_process"];

        
    }else if ([_item[@"bill_state"] integerValue] == 3){
        _SettTypeL.text = @"已结算";
        _SettTypeL.textColor = WYColor(33, 185, 167);
        _imgV.image = [UIImage imageNamed:@"account_used"];

    }
    
}



@end
